<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>  
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
	<div id="preloader">
        <div id="status">&nbsp;</div>
    </div>

    <!-- TOP NAVBAR -->
    <nav role="navigation" class="navbar navbar-static-top">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" class="navbar-toggle" type="button">
                    <span class="entypo-menu"></span>
                </button>
                <button class="navbar-toggle toggle-menu-mobile toggle-left" type="button">
                    <span class="entypo-list-add"></span>
                </button>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div id="bs-example-navbar-collapse-1" class="collapse navbar-collapse">
                <div id="nt-title-container" class="navbar-left running-text visible-lg">
                    <ul class="date-top">
                        <li class="entypo-calendar" style="margin-right:5px"></li>
                        <li id="Date"></li>
                    </ul>

                    <ul id="digital-clock" class="digital">
                        <li class="entypo-clock" style="margin-right:5px"></li>
                        <li class="hour"></li>
                        <li>:</li>
                        <li class="min"></li>
                        <li>:</li>
                        <li class="sec"></li>
                        <li class="meridiem"></li>
                    </ul>
                    <ul id="nt-title" id="sysBrodcastMsgContainer" >
                	<c:forEach items="${_SYSMSG }" var="oneMsg" >
                		<li>${oneMsg }</li>
                	</c:forEach>
                    </ul>
                </div>

                <ul style="margin-right:0;" class="nav navbar-nav navbar-right">
                    <li>
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                           <spring:message code="Hi" />, ${SYSUSERNAME } <b class="caret"></b>
                        </a>
                        <ul style="margin-top:14px;" role="menu" class="dropdown-setting dropdown-menu">
                            <li>
                                <a href="#"> <span class="entypo-vcard"></span>&#160;&#160;<spring:message code="Account Setting" /></a>
                            </li>
                            <li>
                                <a href="javascript:headerObj.changePassword()"> <span class="entypo-tools"></span>&#160;&#160;<spring:message code="Modify Password" /></a>
                            </li>
                            <li>
                                <a href="#"> <span class="entypo-lifebuoy"></span>&#160;&#160;<spring:message code="Help" /></a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="javascript:void(0)" onclick="_sysObj.logOut()"> 
                                	<span class="entypo-logout"></span>&#160;&#160;<spring:message code="Logout" /></a>
                            </li>
                        </ul>
                    </li>
                    <li class="hidden-xs">
                        <a class="toggle-left" href="javascript:void(0)" id="showRightContentDivBtn" >
                            <span style="font-size:20px;" class="entypo-list-add"></span>
                        </a>
                    </li>
                </ul>

            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>
    <!-- /END OF TOP NAVBAR -->

    <!-- SIDE MENU -->
    <div id="skin-select">
        <div id="logo">
            <h1 style="font-size:16px">${_SYSNAME }<span>${_SYSVER }</span></h1>
        </div>

        <a id="toggle">
            <span class="entypo-menu"></span>
        </a>
        <div class="dark">
            <form action="#">
                <span>
                    <input type="text" name="search" value="" class="search rounded id_search" placeholder="Search Menu..." autofocus="">
                </span>
            </form>
        </div>

        <div class="skin-part">
            <div id="tree-wrap">
                <div class="side-bar">
                    
                   <c:forEach var="_mGroup" items="${_allMenu }">
					<shiro:hasPermission name="${_mGroup.name } ">
					
					<ul id='_leftMenu${_mGroup.id }' class='topnav menu-left-nest'>
					<li>
						<a href='javascript:void(0)' style='border-left:0px solid!important;' class='title-menu-left'>
							<span>
								<spring:message code="${_mGroup.name }" />
							</span>
						</a>
					</li>

					<c:forEach var="_oneMenu" items="${_mGroup.childs }">
					<shiro:hasPermission name="${_oneMenu.name } ">
					
						<c:choose>
							<c:when test="${_oneMenu.mtype==2}">
								<li>
								<a class='tooltip-tip' href='javascript:void(0)' title="<spring:message code="${_oneMenu.name }" />"> 
									<i class="${_oneMenu.icon }"></i> <span><spring:message code="${_oneMenu.name }" /></span>
								</a>
								<ul>
								<c:forEach var="_oneMenuItem" items="${_oneMenu.childs }">
								<shiro:hasPermission name="${_oneMenuItem.name } ">
									<li>
										<a class="tooltip-tip ajax-load" href="${_oneMenuItem.url }" title='<spring:message code="${_oneMenuItem.name }" />'> 
											<i class="${_oneMenuItem.icon }"></i> 
											<span><spring:message code="${_oneMenuItem.name }" /></span> 
										</a>
									</li>
								</shiro:hasPermission>	
								</c:forEach>
								</ul>
								</li>
							</c:when>
							<c:otherwise>
								<li>
									<a class="tooltip-tip " href="${_oneMenu.url }" title='<spring:message code="${_oneMenu.name }" />'> 
									<i class="${_oneMenu.icon }"></i> 
									<span><spring:message code="${_oneMenu.name }" /></span> </a>
								</li>
							</c:otherwise>
						</c:choose>
						
					</shiro:hasPermission>
					</c:forEach>
					</ul>
					
					</shiro:hasPermission>
					</c:forEach>
                    
                </div>
            </div>
        </div>
    </div>
    <!-- END OF SIDE MENU -->

